.TH std::basic_string::get_allocator 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::basic_string::get_allocator \- std::basic_string::get_allocator

.SH Synopsis
   allocator_type get_allocator() const;  (noexcept since C++20)
                                          (constexpr since C++20)

   Returns the allocator associated with the string.

.SH Parameters

   \fI(none)\fP

.SH Return value

   The associated allocator.

.SH Complexity

   Constant.

.SH See also

   allocator        the default allocator
                    \fI(class template)\fP
   allocator_traits provides information about allocator types
   \fI(C++11)\fP          \fI(class template)\fP
   uses_allocator   checks if the specified type supports uses-allocator construction
   \fI(C++11)\fP          \fI(class template)\fP
